<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<p id="demo" style="color: red;"></p>
		<div id="example"></div>
		<input type="button"  onclick="history.back()"/>
		<script>
			var w=window.innerWidth
			      || document.documentElement.clientWidth
			      || document.body.clientWidth;
			var h=window.innerHeight
			      || document.documentElement.clientHeight
			      || document.body.clientHeight;
			x=document.getElementById("demo");
			x.innerHTML="浏览器window宽度: " + w + ", 高度: " + h + "。"
			
			console.log(location.href);
			
			txt = "<p>浏览器代号: " + navigator.appCodeName + "</p>";
			txt+= "<p>浏览器名称: " + navigator.appName + "</p>";
			txt+= "<p>浏览器版本: " + navigator.appVersion + "</p>";
			txt+= "<p>启用Cookies: " + navigator.cookieEnabled + "</p>";
			txt+= "<p>硬件平台: " + navigator.platform + "</p>";
			txt+= "<p>用户代理: " + navigator.userAgent + "</p>";
			txt+= "<p>用户代理语言: " + navigator.language + "</p>";
			document.getElementById("example").innerHTML=txt;
		
			console.log(history.back());
			
		</script>
		
	</body>
</html>
